home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 102 / CD-ROM 102.iso / aplic / 2sync / 2SyncSetup.exe / modules / mt / panel / scripts / DefineButton2_378 / BUTTONCONDACTION on(dragOver).as next >
Encoding:
Text File  |  2002-03-20  |  2.2 KB  |  83 lines

  1. on(dragOver){
  2.    if(eval("../../:validDrag"))
  3.    {
  4.       tellTarget("_level50")
  5.       {
  6.          gotoAndStop("off");
  7.       }
  8.       set("../:selection2",_name.substr("4",length(_name)));
  9.       set("_level100:jctrace",eval("_level100:jctrace") add "\r" add eval("../:selection2"));
  10.       if(eval("../:selection2") != eval("../:selection1"))
  11.       {
  12.          if(eval("../:selection1") < eval("../:selection2"))
  13.          {
  14.             a = eval("../:selection1");
  15.             b = eval("../:selection2");
  16.             set("createDragEvent:a",eval("../:selection1"));
  17.             set("createDragEvent:b",eval("../:selection2"));
  18.          }
  19.          else
  20.          {
  21.             a = eval("../:selection2");
  22.             b = eval("../:selection1");
  23.             set("createDragEvent:a",eval("../:selection2"));
  24.             set("createDragEvent:b",eval("../:selection1"));
  25.          }
  26.          x = "0";
  27.          while(endObj >= x)
  28.          {
  29.             if(a < x and x < b)
  30.             {
  31.                tellTarget("../obj" add x)
  32.                {
  33.                   gotoAndStop("inSelection");
  34.                }
  35.             }
  36.             else
  37.             {
  38.                tellTarget("../obj" add x)
  39.                {
  40.                   gotoAndStop("init");
  41.                }
  42.             }
  43.             x += "1";
  44.          }
  45.       }
  46.       else
  47.       {
  48.          x = "0";
  49.          while(endObj >= x)
  50.          {
  51.             tellTarget("../obj" add x)
  52.             {
  53.                gotoAndStop("init");
  54.             }
  55.             x += "1";
  56.          }
  57.       }
  58.       if(eval("../:selection2") < eval("../:selection1"))
  59.       {
  60.          tellTarget("../obj" add eval("../:selection1"))
  61.          {
  62.             gotoAndStop("firstSelectedUp");
  63.          }
  64.          gotoAndStop("currentOverAbove");
  65.       }
  66.       else if(eval("../:selection1") < eval("../:selection2"))
  67.       {
  68.          tellTarget("../obj" add eval("../:selection1"))
  69.          {
  70.             gotoAndStop("firstSelectedDown");
  71.          }
  72.          gotoAndStop("currentOverBelow");
  73.       }
  74.       else
  75.       {
  76.          tellTarget("../obj" add eval("../:selection1"))
  77.          {
  78.             gotoAndStop("firstSelected");
  79.          }
  80.       }
  81.    }
  82. }
  83.